const path = require('path');
const BASE_URL = process.env.NODE_ENV === "production" ? "/" : "/";
function resolve(dir) {
    return path.resolve(__dirname, dir)
}
module.exports = {
    // publicPath: BASE_URL,
    // 如果你不需要使用eslint，把lintOnSave设为false即可
    lintOnSave: false,
    chainWebpack: config => {
        config.resolve.alias.set('@src', resolve('src'))
    },
    devServer: {
        clientLogLevel: "silent"
    },
    configureWebpack: config => {
        //process.env.NODE_ENV === 'production'
        return {
            plugins: [],
            module: {
                rules: [
                    {
                        test: /\.md$/, use: [{
                            loader: path.resolve('loaders/md-loader.js'),
                            options: {}
                        }]
                    }
                ]
            }
        }
    }
}